{layout name="main"/}
<script type="text/javascript" src="/static/js/jquery.citys.js"></script>
<div class="wrapper wrapper-content animated fadeInUp">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>注册新管理员</h5>
                </div>
                <div class="ibox-content">
                    <form method="post" action="" class="form-horizontal m-t" id="RegUser">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">会员等级 * </label>
                            <div class="col-sm-5">
                                <select class="form-control" name="account_type">
                                    <option>请选择</option>
                                    <option selected="selected">普通会员</option>
                                    <option>理财会员</option>
                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">会员编号 * </label>
                            <div class="col-sm-5">
                                <input type="text" placeholder="请输入会员编号" class="form-control" name="user_uniid" value="">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">会员昵称 * </label>
                            <div class="col-sm-5">
                                <input type="text" placeholder="请输入会员昵称" class="form-control" name="user_name" value="">
                            </div>
                        </div>


                        <div class="hr-line-dashed" hidden></div>

                        <div class="form-group" hidden>
                            <label class="col-sm-3 control-label">一级密码 * </label>
                            <div class="col-sm-5">
                                <input type="password" placeholder="请输入一级密码" class="form-control" name="password" value="">
                                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 该密码用于系统登录</span>
                            </div>
                        </div>
                        <div class="form-group" hidden>
                            <label class="col-sm-3 control-label">重复一级密码 * </label>
                            <div class="col-sm-5">
                                <input type="password" placeholder="请重复输入一级密码" class="form-control" name="password_confirm" value="">
                            </div>
                        </div>

                        <div class="form-group" hidden>
                            <label class="col-sm-3 control-label">二级密码 * </label>
                            <div class="col-sm-5">
                                <input type="password" placeholder="请输入二级密码" class="form-control" name="password2" value="">
                                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 该密码用于业务验证</span>
                            </div>
                        </div>
                        <div class="form-group" hidden>
                            <label class="col-sm-3 control-label">重复二级密码 * </label>
                            <div class="col-sm-5">
                                <input type="password" placeholder="请重复输入二级密码" class="form-control" name="password2_confirm" value="">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-3">
                                <button class="btn btn-primary" type="button" onclick="add()">提交</button>
                            </div>
                        </div>

                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    function add() {
        var postdata = $("#RegUser").serialize();
        post({
            url: "{$thispageurl}",
            data: postdata,
            success: function(res) {
                swal({
                    title: 'success',
                    text: res.message,
                    type: "success"
                }, function() {
                    reload();
                });
            },
            error: function(error) {
                swal("错误", JSON.parse(error.responseText).message, "error");
            }
        });
    }
</script>
